import 'package:flutter/material.dart';

class ListViewHomePage extends StatefulWidget {
  @override
  _ListViewHomePageState createState() => _ListViewHomePageState();
}

class _ListViewHomePageState extends State<ListViewHomePage> {
  bool select = false;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("listview配置"),
      ),
      // 线性布局
      body: ListView(
        // 子widget的方向
        scrollDirection: Axis.vertical,
        // 是否包裹子widget
        shrinkWrap: true,
        // 回弹效果
        physics: BouncingScrollPhysics(),
        children: [
          Container(
              width: 80,
              height: 80,
              child: Text("container"),
              margin: EdgeInsets.all(10),
              color: Colors.grey),
          Container(
              width: 80,
              height: 80,
              margin: EdgeInsets.all(10),
              child: Text("container"),
              color: Colors.grey),
          Container(
              width: 80,
              margin: EdgeInsets.all(10),
              height: 80,
              child: Text("container"),
              color: Colors.grey),
          Container(
              width: 80,
              height: 80,
              margin: EdgeInsets.all(10),
              child: Text("container"),
              color: Colors.grey),
          Container(
              width: 80,
              height: 80,
              margin: EdgeInsets.all(10),
              child: Text("container"),
              color: Colors.grey),
          Container(
              width: 80,
              height: 80,
              margin: EdgeInsets.all(10),
              child: Text("container"),
              color: Colors.grey),
          Container(
              width: 80,
              height: 80,
              margin: EdgeInsets.all(10),
              child: Text("container"),
              color: Colors.grey),
        ],
      ),
    );
  }
}
